﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace FretBoard
{
    class STR
    {
        List<string> stringNotes;

        public STR(string openNote)
        {
            stringNotes = new List<string>();
            var start = Notes.notes.IndexOf(openNote);
            for (int i = 0; i < 22; i++)
            {
                stringNotes.Add(Notes.getNote(openNote, i));
            }
        }

        public string getNotePositions(string note)
        {
            StringBuilder ret = new StringBuilder();
            for (int i = 0; i < this.stringNotes.Count; i++)
            {
                if (stringNotes[i].ToLower() == note.ToLower())
                    ret.Append(i + ",");
            }
            ret.Replace(",", "", ret.Length - 2, 2);
            return ret.ToString();
        }


        public String returnNotes()
        {
            var ret = new StringBuilder();
            foreach (var val in stringNotes)
            {
                ret.Append(val + " , ");
            }
            ret.Replace(",", "", ret.Length - 2, 2);
            return ret.ToString();
        }
    }
}
